package com.csl.jsonpreference.test

import com.csl.jsonpreference.bean.ConfigTYPE
import com.csl.jsonpreference.tag.Configurable

/**
 * aqua wifi 设备硬件参数.
 */

@Configurable(discribe = "wifi配置")
class AquaDeviceConfig {

    @Configurable(discribe = "设备名(显示为:aqua_设备名)", type = ConfigTYPE.TXT, index = 0)
    var deviceName = ""



    @Configurable(discribe = "加入的wifi名", type = ConfigTYPE.TXT, index = 1)
    var ssid = ""

    @Configurable(discribe = "加入的wifi密码", type = ConfigTYPE.TXT, index = 2)
    var ssidPassword = ""

    @Configurable(discribe = "是否连接远程平台", type = ConfigTYPE.BOOLEAN, index = 3)
    var remoteServer = false

    @Configurable(discribe = "远程平台地址", type = ConfigTYPE.TXT, index = 4)
    var remoteServerName = ""

    @Configurable(discribe = "串口1转发", type = ConfigTYPE.OBJECT, index = 5)
    var serial1 = AquaLocalSerialConfig()

    @Configurable(discribe = "串口2转发", type = ConfigTYPE.OBJECT, index = 6)
    var serial2 = AquaLocalSerialConfig()


    @Configurable(discribe = "颜色", type = ConfigTYPE.COLOR, index = 7)
    var color = 0

    override fun toString(): String {
        return "AquaDeviceConfig(deviceName='$deviceName', ssid='$ssid', ssidPassword='$ssidPassword', remoteServer=$remoteServer, remoteServerName='$remoteServerName', serial1=$serial1, serial2=$serial2, color=$color)"
    }
//    @Configurable(discribe = "设备物理地址", type = ConfigTYPE.TXT, index = 7)
//    var mac = ""






}